# uncompyle6 version 3.2.3
# Python bytecode 3.6 (3379)
# Decompiled from: Python 3.6.8 |Anaconda custom (64-bit)| (default, Feb 21 2019, 18:30:04) [MSC v.1916 64 bit (AMD64)]
# Embedded file name: db\views\targets_extended.py
__author__ = "sanyi"
from sqlalchemy import *
from sqlalchemy.orm import mapper
from sqlalchemy.dialects.postgresql import UUID as C_UUID
from db.tables import metadata

TargetsExtendedViewTable = Table(
    "targets_extended",
    metadata,
    Column("target_id", C_UUID, primary_key=True),
    Column("owner_id", C_UUID),
    Column("creator_id", C_UUID),
    Column("address", TEXT),
    Column("description", TEXT),
    Column("criticality", INTEGER),
    Column("last_scan_id", C_UUID),
    Column("last_scan_date", DateTime(true)),
    Column("last_scan_session_id", C_UUID),
    Column("last_scan_session_status", TEXT),
    Column("vuln_info", INTEGER),
    Column("vuln_low", INTEGER),
    Column("vuln_medium", INTEGER),
    Column("vuln_high", INTEGER),
    Column("threat", INTEGER),
    Column("deleted_at", DateTime(true)),
    Column("continuous_mode", BOOLEAN),
    Column("manual_intervention", BOOLEAN),
    Column("verification", TEXT),
    Column("type", TEXT),
)


class TargetExtendedViewRow(object):
    owner_id = None
    target_id = None
    criticality = None
    vuln_info = None
    vuln_low = None
    vuln_medium = None
    vuln_high = None
    address = None
    threat = None
    description = None
    last_scan_id = None
    last_scan_date = None
    deleted_at = None
    manual_intervention = None
    type = None

    def __str__(self):
        return "R_target_ext[%s:%s]=%s" % (self.target_id, self.owner_id, self.address)

    def __repr__(self):
        return self.__str__()


mapper(TargetExtendedViewRow, TargetsExtendedViewTable)
